
<?
    /**
     * TODO
     * 1.Show Time
     * 2.Diff Time
     * 3.Favorited
     * 4.Modal
     */
     $tweet['created_time_formatted'] = Html::formatDateTime($tweet['created_time'], "yyyy-MM-dd HH:mm:ss", "c");
     $class = "";
     switch ($tweet['refav']){
         case "1":
             $class = "retweeted";
             break;
         case "10":
             $class = "favorited";
             break;
         case '11':
             $class = "retweeted favorited";
             break;
     }
     
?>
<div class="js-stream-item stream-item stream-item">
    <div class="tweet <? echo $class?>">
        <i class="dogear"></i>
        <div class="content">
            <div class="stream-item-header">
                <small class="time">
                    <a href="<? echo $this->createUrl('/tweet/detail',array('tweet_id'=> $tweet['tweet_id']))?>" class="tweet-timestamp js-permalink"><span class="_timestamp" data-long-form="true" title="<? echo $tweet['created_time_formatted']?>">9h</span></a>
                </small>
                <a class="account-group" href="https://twitter.com/books4experts">
                    <img class="avatar" src="<?php echo $tweet['avatar']?>" alt="Books for experts">
                    <strong class="fullname"><? echo $tweet['full_name']?></strong>
                    <span>‏</span><span class="username"><s>@</s><b><? echo $tweet['username']?></b></span>
                </a>
            </div>
            <p class="js-tweet-text">
                <!-- Content here -->
                <? echo $tweet['content']?>
            </p>
            <div class="stream-item-footer">
                <div class="context">
                </div>
                <a class="details with-icn js-details" href="<? echo $this->createUrl('/tweet/detail/', array('tweet_id'=> $tweet['tweet_id']))?>">
                    <span class="details-icon js-icon-container">
                    </span>
                    <b>
                        <span class="expand-stream-item js-view-details">
                            <span class="expand-action-wrapper">
                                Expand
                            </span>
                        </span>
                        <span class="collapse-stream-item js-hide-details">
                            <span class="collapse-action-wrapper">
                                Collapse
                            </span>
                        </span>
                    </b>
                </a>
                <ul class="tweet-actions">
                    <li class="action-reply-container">

                        <a class="with-icn js-action-reply" data-modal="tweet-reply" href="https://twitter.com/#" title="Reply">
                            <i class="sm-reply"></i>
                            <b>Reply</b>
                        </a>
                    </li>
                    <li class="action-rt-container">
                        <a class="with-icn js-toggle-rt" data-modal="tweet-retweet" href="https://twitter.com/#">
                            <i class="sm-rt"></i>
                            <b><span class="undo-retweet" title="Undo retweet">Retweeted</span><span class="retweet" title="Retweet">Retweet</span></b>
                        </a>
                    </li>
                    <li class="action-del-container">
                        <a class="with-icn js-action-del" href="https://twitter.com/#" title="Delete">
                            <i class="sm-trash"></i>
                            <b>Delete</b>
                        </a>
                    </li>
                    <li class="action-fav-container">
                        <a class="with-icn js-toggle-fav" onClick="js:fav('<? echo $tweet['tweet_id']?>')">
                            <i class="sm-fav"></i>
                            <b>
                                <span class="unfavorite" title="Undo favorite">Favorited</span>
                                <span class="favorite" title="Favorite">Favorite</span>
                            </b>
                        </a>
                    </li>
                </ul>      </div>
            <div class="expanded-content js-tweet-details-dropdown">
            </div>
        </div>
    </div>
</div>